package com.augurit.wf.app.document.service;

import java.util.List;

import org.springside.modules.orm.Page;

import com.augurit.wf.app.document.utils.DocTreeNode;
import com.augurit.wf.app.document.utils.Version;
import com.augurit.wf.app.document.web.form.DocCategoryForm;
import com.augurit.wf.app.document.web.form.DocumentForm;

public interface IdocCategory {

	public List<DocTreeNode> buildTree(Long id ,String version);
	public boolean catUpdate(Long id,String text);
	public boolean catSave(DocCategoryForm form);
	public Page<DocumentForm> searchDocuments(Page<DocumentForm> page,DocumentForm form);
	public Long findByName(String name);
	public void saveDoc(DocumentForm form);
	public String findDocUrl(Long id);
	public String findDocFileName(Long id);
	public List<DocCategoryForm> findAllCat();
	public Boolean deletedocs(String path,Long...ids);
	public DocumentForm findDoc(Long id);
	public String findCatName(Long id);
	public void deleteDir(String path,Long id);
	/**
	 * 查询文档
	 * @param version
	 * @return
	 */
	public List<DocumentForm> findDocument(String version,String status);
	
	//获取所有文档的版本
	public List<Version> getVersionList();
	
	/**
	 * 获取指定目录下的给定名称的目录
	 * @param pid
	 * @param childCatName
	 * @return
	 */
	public List<DocCategoryForm> getCategoryUnderGivenCategory(Long pid, String childCatName);
}
